/**
 * @Author: 焦质晔
 * @Date: 2019/6/20
 * @Last Modified by:   焦质晔
 * @Last Modified time: 2019-06-20 15:45:00
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 保存厂牌积分规则
export const saveBrandIntegralInfo = params => axios.post(`${SERVER.MEMBERS_CLUB}/basic/integral/saveBrandIntegralInfo`, params);

// 逻辑删除厂牌积分规则
export const deleteBrandIntegral = params => axios.post(`${SERVER.MEMBERS_CLUB}/basic/integral/deleteBrandIntegral`, params);

// 获取厂牌积分主页面列表数据
export const searchBrandIntegralList = params => axios.get(`${SERVER.MEMBERS_CLUB}/basic/integral/searchBrandIntegralList`, { params });

// 获取下拉框数据通用接口
export const getSelectionData = params => axios.get(`${SERVER.MEMBERS_CLUB}/basic/integral/getSelectionData`, { params });

// 获取主页面列表数据
export const getIntegralList = params => axios.get(`${SERVER.MEMBERS_CLUB}/basic/integral/getIntegralList`, { params });

// 保存委托书积分规则
export const saveEntrustIntegralInfo = params => axios.post(`${SERVER.MEMBERS_CLUB}/basic/integral/saveEntrustIntegralInfo`, params);

// 逻辑删除委托书积分规则
export const deleteEntrustIntegralInfo = params => axios.post(`${SERVER.MEMBERS_CLUB}/basic/integral/deleteEntrustIntegralInfo`, params);

// 获取委托书积分主页面列表数据
export const searchEntrustIntegralList = params => axios.get(`${SERVER.MEMBERS_CLUB}/basic/integral/searchEntrustIntegralList`, { params });

// 逻辑删除委托书积分规则
export const saveIntegralInfo = params => axios.post(`${SERVER.MEMBERS_CLUB}/basic/integral/saveIntegralInfo`, params);

// 获取联盟关系
export const getAlliance = params => axios.get(`${SERVER.MEMBERS_CLUB}/membersAlliance/getMembershipAlliance`, { params });

// 下载委托书积分规则
export const downloadEntrustIntegralRule = params => axios.get(`${SERVER.MEMBERS_CLUB}/basic/integral/downloadEntrustIntegralRule`, { params });

// 下载委托书积分规则
export const downloadIntegralRule = params => axios.get(`${SERVER.MEMBERS_CLUB}/basic/integral/downloadIntegralRule`, { params });
